<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class History extends MY_Controller {

	function __construct() {
		parent::__construct();
	}
	
	public function index()
	{
		if ($this->isSessionActive()) {

			$this->load->model('History_model');
			$data['successful_offers'] = $this->History_model->get_successful_offers($this->fb_id);
			$data['successful_requests'] = $this->History_model->get_successful_requests($this->fb_id);
			$data['user'] = $this->fb_id;
			$data['title'] = 'Your History';
			$data['content_view'] = 'history_view';
			$data['stylesheets'] = array('history', 'paginate-style');
			$data['javascripts'] = array('paginate', 'history_paginate');
    		$this->load_template_view($data, TRUE);
		}
	}
	
}